if (ts.options.showError)
ts.options.showError(cm, msg);
tempTooltip(cm, String(msg));
function closeArgHints(ts) { if (ts.activeArgHints) { remove(ts.activeArgHints); ts.activeArgHints = null; } function docValue(ts, doc) { var val = doc.doc.getValue();
if (ts.options.fileFilter) val = ts.options.fileFilter(val, doc.name, doc.doc);
function WorkerServer(ts) { var worker = new Worker(ts.options.workerScript);
worker.postMessage({type: "init", plugins: ts.options.plugins,
scripts: ts.options.workerDeps});
var msgId = 0, pending = {}; worker.postMessage(data);
worker.onmessage = function(e) { if (data.type == "getFile") { getFile(ts, data.name, function(err, text) { send({type: "getFile", err: String(err), text: text, id: data.id}); } else if (data.type == "debug") { console.log(data.message);
} else if (data.id && pending[data.id]) { pending[data.id](data.err, data.body);
worker.onerror = function(e) { for (var id in pending) pending[id](e);
this.addFile = function(name, text) { send({type: "add", name: name, text: text}); }; this.delFile = function(name) { send({type: "del", name: name}); }; this.request = function(body, c) { send({type: "req", body: body}, c); };